package cjgl.entity;

import cjgl.dao.TbClassDAO;

public class Student {
	private Integer id;
	private String name;
	private String password;
	private String stuNo;
	private TbClass tbclass;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getStuNo() {
		return stuNo;
	}
	public void setStuNo(String stuNo) {
		this.stuNo = stuNo;
	}
	public TbClass getTbclass() {
		return tbclass;
	}
	public void setTbclass(TbClass tbclass) {
		this.tbclass = tbclass;
	}
	public Student() {
		super();
	}
	
	public Student(Integer id, String name, String password, String stuNo, Integer cla_id) {
		super();
		this.id = id;
		this.name = name;
		this.password = password;
		this.stuNo = stuNo;
		this.tbclass = new TbClassDAO().findById(cla_id);
	}
	
	public Student(Integer id) {
		super();
		this.id = id;
	}
	
	@Override
	public String toString() {
		return "Student [id=" + id + ", name=" + name + ", password=" + password + ", stuNo=" + stuNo + ", tbclass="
				+ tbclass + "]";
	}
	
	
	
	
}
